	SJ128, high-speed serial bus support on the C128 with JiffyDOS devices
	Copyright (C) 2009 Robert Willie <hydradix@yahoo.com>

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License version 2 as
	published by the Free Software Foundation.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	("COPYING.TXT") along with this program; if not, write to

	Free Software Foundation, Inc.
	59 Temple Place
	Suite 330
	Boston, MA  02111-1307
	USA

This software enables the Commodore 128 computer to communicate with
JiffyDOS (compatible) devices without having to replace ROM(s) inside
the computer.  It uses the "JiffyDOS protocol" when communicating with
devices upgraded with JiffyDOS ROMs (like the 1541, 1571, 1581), and
with devices that natively support JiffyDOS (like SD2IEC, uIEC).

For other devices, it will use fast serial routines if supported by
the device (like 1571, 1581).  Finally it resorts to standard (slow)
serial bus protocol for other devices (like a printer or 1541).

Once installed, you can enjoy JiffyDOS speed with appropriate devices.
To restore the default serial routines, press STOP + RESTORE.

It works fine on a real NTSC C128 with a uIEC/SD
and two 1571 drives (one 1571 and uIEC have JiffyDOS).

Using VICE v2.0, loading/saving/verifying work fine, as far as I tested
in both NTSC and PAL video standard emulation.  However, sequential
data transmission (like with DIRECTORY) will sometimes have errors.
I've verified my timing, but can not explain this.  All I know is I did
not experience any problems on my NTSC Commodore 128.

The source code was compile with "xa" (v2.1.4h) by A.Fachat.

This was inspired by my desire to have fast access to my uIEC/SD drive
and by discussions on C128 Alive! Forum.  In particular, forum member
Diddl suggested the program SJLOAD available for the VIC-20 and C64.

After trying SJLOAD, I was excited because it worked in C64 mode,
but had some non-standard features, like screen blanking and changing
the way VERIFY works.  The VERIFY feature might be handy on the C64
but is not needed on the C128 with its exceptional version of BASIC.

A quick review of the source code also revealed that it did some
not-so-nice things with the bits in $DD00.  In particular, it would
trash the VIC-II bank bits, and the UserPort PA2 bit.

So I wrote my own version by studying how the emulated version (in VICE)
of JiffyDOS works.  Enjoy, and feel free to report any problems.

Version history:

Dec 8, 2009: wrote talk/listen/input/output routines in ML MONITOR
Dec 9, 2009: converted to xa assembler format
Dec 10, 2009: added support for ChkIn/CkOut/ClrCh/BasIn/BsOut
Dec 11, 2009: added support for Load/Save/Verify
Dec 12, 2009: testing on NTSC C128 with uIEC/SD and 1571
Dec 13, 2009: wrote BASIC install and more testing with VICE
